package com.sm.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sm.controller.request.UpdateProfileRequest;
import com.sm.entity.Teacher;
import com.sm.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author Cola
 * @description
 * @date 2022/1/30
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {





    String getRole(@Param("userId") Integer userId);
    String getPassword(@Param("userId") Integer userId);
    User getUserByUserName(@Param("username") String username);
    int updatePassword(@Param("userId") Integer userId,@Param("password") String password);
    int updateProfile(@Param("userId") Integer userId, @Param("newProfile") UpdateProfileRequest updateProfileRequest);
    void addTeacher(User user);
    String getUsernameById(@Param("userId") Integer userId);

}
